{% extends "base.html" %}
{% load markup %}

{% block title %}User profile{% endblock %}

{% block primary-content %}
<span class="breadcrumbs"><a href="{% url index %}" title="Home">Home</a> &raquo; Profile</span>
<h2>{% if profile.user.get_full_name %}{{ profile.user.get_full_name }}{% else %}{{ profile.user }}{% endif %}</h2>
  {% if profile.user.get_profile.photo %}
  <img class="avatar" src="{{ profile.user.get_profile.photo.url }}"/>
  {% else %}
  <img class="avatar" src="{{ MEDIA_URL }}images/default-avatar.gif"/>
  {% endif %}
	<div class="wide-column">
		<h3>Comments</h3>
		{% if profile.user.comment_comments.all %}
		<ol id="profile-comment-list">
			{% for comment in profile.user.comment_comments.all %}
			<li class="comment clearfix">
				<div class="comment-body">
					{{ comment.comment|markdown:"safe" }}
				</div>
				<div class="comment-info">
					<cite>on <a href="{% url blog_post comment.content_object.id %}">{{ comment.content_object }}</a></cite>
					<small class="date-posted">{{ comment.submit_date|date }}</small>
				</div>
			</li>
			{% endfor %}
		</ol>
		{% else %}
		<p>No comments yet.</p>
		{% endif %}
	</div>

{% endblock %}

